home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.hut.fi!usenet
- From: hakola@cc.hut.fi (Petri Hakola)
- Newsgroups: comp.lang.c
- Subject: Set-merging algorithm?
- Date: 15 Apr 1996 15:35:46 +0300
- Organization: Capten Napalm`s Thermonuclear League of Liberty
- Sender: hakola@gamma.hut.fi
- Distribution: inet
- Message-ID: <m1a91fx7jh9.fsf@gamma.hut.fi>
- Reply-To: Petri.Hakola@hut.fi
- NNTP-Posting-Host: gamma.hut.fi
- X-Newsreader: Gnus v5.1
-
-
- 'allo,
-
- Is there any sophisticated algorithm for merging and building
- combinations from sets.
-
- Like this:
- I have {a, b, c} + {d e} + {f} and I need to form all possible
- combinations. The amount of combs. is (of course) 3*2*1 = 6,
- and the groups are as follows:
-
- {a d f} + {a e f} + {b d f} + {b e f} + {c d f} + {c e f}
-
- (i.e. only one member per set is 'allowed' in one group
- (superset?))
-
- If there are more than a couple of sets, the amount of time
- required to build all combinations is quite long, so I'd like
- to know is there a better way to build these than
- BruteForce.
-
- Any help greatly appreciated
-
- - Petri -
-